import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post',
    data: {}
  })
}

export function register(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data
  })
}

export function userinfo(data) {
  return request({
    url: '/user/userinfo',
    method: 'post',
    data
  })
}

export function changeUser(data){
  return request({
    url: '/user/changeuser',
    method: 'post',
    data
  })
}

export function changePwd(data){
  return request({
    url: '/user/changepwd',
    method: 'post',
    data
  })
}